import request from '@/utils/HttpRequest'

/**
 * 订单
 */
export default {

    //获取订单确认页面数据
    getOrderConfirmInfo(params) {
        return request({
            url: '/gmmallorder/order/getOrderConfirm',
            method: 'get',
            params: params
        })
    },

    //提交订单
    submitOrderInfo(order) {
        return request({
            url: '/gmmallorder/order/submitOrder',
            method: 'post',
            data: order
        })
    },

    //获取订单信息
    getOrderListInfo(params) {
        return request({
            url: '/gmmallorder/order/getOrderList',
            method: 'get',
            params: params
        })
    },

    getOrderInfo(orderSn) {
        console.log(orderSn)
        return request({
            url: '/gmmallorder/order/getOrder/' + orderSn,
            method: 'get',
        })
    },

    cancelOrderInfo(orderSn, status) {
        return request({
            url: '/gmmallorder/order/updateStatus/' + orderSn + '/' + status,
            method: 'get',
        })
    }

}